﻿using System;
using Newtonsoft.Json;
using Jxym.wlkc2011.Module.Default.model;
using Jxym.DBUtility;
using Jxym.Common.JSON;
using Newtonsoft.Json.Converters;

namespace Jxym.wlkc2011.Module.Default.SERVER.User
{
    public partial class UserModel : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                int id = Convert.ToInt32(Common.Request.Params("id"));
                string str = "{}";

                try
                {
                    if (id != 0)
                    {
                        MsSqlDal<User_Info> iUi = new MsSqlDal<User_Info>();

                        User_Info info = iUi.GetModel("ID=" + id, null);

                        str = JsonConvert.SerializeObject(info, new JavaScriptDateTimeConverter());
                    }
                }
                catch (Exception) { }

                Response.Write(str);
            }
        }
    }
}